home *** CD-ROM | disk | FTP | other *** search
- Path: news.hungary.net!not-for-mail
- From: imed@odin.net (Tamas Dunaszegi)
- Newsgroups: comp.lang.c,comp.lang.c++,comp.os.ms-windows.programmer.misc,comp.os.msdos.programmer,comp.programming,comp.windows.ms.programmer
- Subject: Re: How to access miliseconds?
- Date: 3 Mar 1996 02:20:12 -0000
- Organization: ODIN Hungary +36-1-213-2023
- Message-ID: <WwjNx8Nc7kSX083yn@odin.net>
- References: <4fqh79$j4j@usenet.rpi.edu> <3121E861.3EA8@tid.es>
- <31232CFA.6007@lure.u-psud.fr>
- NNTP-Posting-Host: omega.hungary.net
-
- In article <31232CFA.6007@lure.u-psud.fr>,
- Laurent Pointal <pointal@lure.u-psud.fr> wrote:
- >Mariano wrote:
- > >
- > > You can use :
- > >
- > > UINT SetTimer (hwnd, idTimer,uTimeOut, tmprc);
- > >
- > > hwnd handle to the window associated with the timer (and with tmprc);
- > > idTimer a nonzero timer identifier.
- > > uTimeOut in mseconds,
- > > tmprc is a pointer to a function to handle the timeouts of the timer.
- > >
- > >
- > > BOOL KillTimer (hwnd, idTimer); when you finish to use the Timer.
- > >
- > > --
- > > Mariano Garcia Ruiz (mgr@tid.es)
- >
- >If you get a true millisecond timing resolution with SetTimer, please, email me how you have done
- >such a miracle :-).
- >Honnestly, SetTimer is right to maintain a clock displaying or things like that, but it has not a
- >millisecond precision.
- >
-
- You can read a timer with msec resolution using the VTD virtual device
- driver.
-
- First you must get the API entry point of tha VxD calling int 2F this way:
-
- asm mov ax, 1684h
- asm mov bx, 5 ; vxd_id
- asm xor di, di
- asm mov es, di
- asm int 2fh
-
- Now you have the entry point in es:di. If you call this with 0101h in ax,
- you get back the time since Windows startup in msecs in the eax register.
-
- That's all folks.
-
- ---------------------------------------------------------------------------
- Tamas Dunaszegi
- 8000 Szekesfehervar, Dobsinai u. 4., HUNGARY
- imed@odin.net
-
-